Implementation of custom bytetrack demo for real time stream analysis [GSoC'2026] - #4420
Implementation of custom bytetrack demo for real time stream analysis [GSoC'2026]#4420Vishwa2684 wants to merge 25 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a new MediaPipe ByteTrack demo that integrates OVMS + the existing real-time stream analysis Python client to run object detection + multi-object tracking on RTSP streams. It also updates the MediaPipe build integration and adjusts streaming timestamp handling in the KFS graph executor.
Changes:
- Adds a new
demos/mediapipe/bytetrackdemo (graph, OVMS config, and setup README). - Extends the real-time stream analysis Python demo CLI to pass FFmpeg output dimensions through to
StreamClient. - Updates MediaPipe/Bazel integration (new ByteTrack calculators dependency; changes MediaPipe git_repository source) and adds stricter timestamp monotonicity checks for streaming.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
WORKSPACE |
Switches the MediaPipe repository source (currently to a fork/branch). |
third_party/mediapipe_calculators/BUILD |
Adds ByteTrack calculators target to the OVMS MediaPipe calculators aggregation library. |
src/kfs_frontend/kfs_graph_executor_impl.cpp |
Changes timestamp deserialization/defaulting and adds stream-level monotonic timestamp enforcement. |
demos/real_time_stream_analysis/python/client.py |
Adds CLI args for FFmpeg output width/height and forwards them to StreamClient. |
demos/mediapipe/bytetrack/README.md |
Introduces demo setup/run instructions for ByteTrack RTSP streaming demo. |
demos/mediapipe/bytetrack/config.json |
Adds OVMS config for the YOLOX model + ByteTrack MediaPipe graph. |
demos/mediapipe/bytetrack/bytetrack_ovms.pbtxt |
Adds the MediaPipe graph wiring OpenVINO/OVMS inference + ByteTrack tracking + overlay. |
Suppressed comments (1)
src/kfs_frontend/kfs_graph_executor_impl.cpp:1147
- The inline comment "// this method" is not descriptive. Either remove it or replace with a comment that explains what the function does.
// this method
Status createAndPushPacketsImpl(
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
make sdl-check is failing with error: |
|
@atobiszei @dtrawins I've written code for custom calculator |
0a2781e to
fdb2dac
Compare
4a0b8f8 to
bf1c022
Compare
bf1c022 to
7524ee6
Compare
|
@dtrawins Why is the ci failing? Could you share the logs? |
7d36dd6 to
2b2ba29
Compare
b5da86c to
0369140
Compare
| return absl::OkStatus(); | ||
| } | ||
|
|
||
| absl::Status Process(CalculatorContext* cc) final { |
…server into gsoc_bytetrack
3f64593 to
76e1bbf
Compare
| float score_ = 0.f; | ||
| bool is_activated_ = false; | ||
| TrackState state_ = TrackState::NEW; | ||
| static std::atomic<int> count_; |
There was a problem hiding this comment.
This is static - one instance per OVMS instance. OVMS allows for several concurrent inferences at a time - don't we have a bug here? We should have a bytetrack stored per graph/calculator instance not per process.
|
|
||
| namespace mediapipe { | ||
|
|
||
| class DetectionColorByIdCalculator : public CalculatorBase { |
There was a problem hiding this comment.
Coudl we add some simple test for this calculator using mediapipe::CalculatorRunner and for ov_yolox_tensors_to_detections?
| }; | ||
|
|
||
| // IoU between two [top, left, bottom, right] boxes | ||
| inline float ComputeIoU(const Eigen::Vector4f& a, |
There was a problem hiding this comment.
There's a lot of utilities functions in PR that could end in exceptions. We should defend against such cases at some point, as hackers could try to do DoS on OVMS with malicious inputs.
3673bba to
272d2fc
Compare
272d2fc to
9c4c60e
Compare
@atobiszei @dtrawins
Summary
This PR adds a ByteTrack Real-Time Stream Analysis demo for OpenVINO Model Server (OVMS).
The demo reuses the MediaPipe ByteTrack graph from
demos/mediapipe/bytetrackwith theyolox_tinymodel and integrates it with thereal_time_stream_analysisPython client. This enables object detection and multi-object tracking on RTSP streams using OVMS.Key Changes
Implementation of custom bytetrack graph [GSoC'26] mediapipe#131
OVYoloXTensorsToDetectionsCalculatorto process YOLOX output tensors from the YOLOX-Tiny model hosted on Hugging Face.Directory Structure
demos/mediapipe/bytetracksrc/bytetracksrc/yoloxWhat's Included
demos/mediapipe/bytetrack.client.pyexample for running inference with: